<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="824.41">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000000; min-height: 14.0px}
p.p3 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Helvetica; color: #000000}
p.p4 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000; min-height: 12.0px}
p.p5 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #000000}
p.p6 {margin: 0.0px 0.0px 0.0px 0.0px; font: 9.0px Monaco; color: #bf0000}
span.s1 {font: 18.0px Helvetica}
span.s2 {color: #000000}
span.s3 {color: #0000bf}
span.Apple-tab-span {white-space:pre}
</style>
</head>
<body>
<p class="p1"><span class="s1"><b>Astrocade</b></span><span class="s2"><b><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span></b></span><b>Sound Chip Simulator</b></p>
<p class="p2"><br></p>
<p class="p2"><br></p>
<p class="p1">Astrocade custom 'IO' chip sound chip driver by Aaron Giles and Frank Palazzolo.</p>
<p class="p1">(not sure this is working as it should but still somewhat fun sounding)</p>
<p class="p2"><br></p>
<p class="p3"><b><span class="Apple-tab-span">	</span>*ar(reg0, reg1, reg2, reg3, reg4, reg5, reg6, reg7)</b></p>
<p class="p3"><b><span class="Apple-tab-span">	</span></b><span class="Apple-tab-span">	</span>reg0 -<span class="Apple-converted-space"> </span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>7-0 - master oscillator frequency</p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>reg1 -<span class="Apple-converted-space"> </span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>7-0 - tone generator<span class="s2"> A frequency</span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>reg2 -<span class="Apple-converted-space"> </span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>7-0 - tone generator<span class="s2"> B frequency</span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>reg3 -<span class="Apple-converted-space"> </span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>7-0 - tone generator<span class="s2"> C frequency</span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>reg4 -<span class="Apple-converted-space"> </span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>7-6<span class="Apple-converted-space">  </span>- vibrato speed</p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>5-0<span class="Apple-converted-space">  </span>- vibrato depth</p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>reg5 -<span class="Apple-converted-space"> </span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>5 - nois<span class="s2">e AM enable</span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>4 - mux source (0=vibrato, 1=noise)</p>
<p class="p1"><span class="s2"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>3-0<span class="Apple-converted-space">  </span>- to</span>ne generator C volume</p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>reg6 -<span class="Apple-converted-space"> </span></p>
<p class="p1"><span class="s2"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>7-4 - to</span>ne generator B volume</p>
<p class="p1"><span class="s2"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>3-0 - to</span>ne generator A volume</p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>reg7 -<span class="Apple-converted-space"> </span></p>
<p class="p3"><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span><span class="Apple-tab-span">	</span>7-0 - noise volume</p>
<p class="p4"><br></p>
<p class="p4"><br></p>
<p class="p5">s.boot;</p>
<p class="p5">{<span class="s3">Astrocade</span>.ar}.play</p>
<p class="p5">{<span class="s3">Astrocade</span>.ar(1)}.play</p>
<p class="p5">{<span class="s3">Astrocade</span>.ar(2)}.play</p>
<p class="p5">{<span class="s3">Astrocade</span>.ar(2, 50)}.play</p>
<p class="p4"><br></p>
<p class="p6">//--all three tones</p>
<p class="p5">{<span class="s3">Astrocade</span>.ar(0, <span class="s3">MouseX</span>.kr(0, 255), 100, 200, reg5:2r00001111, reg6:2r111111)}.play</p>
<p class="p4"><br></p>
<p class="p6">//--noise only</p>
<p class="p5">{<span class="s3">Astrocade</span>.ar(reg5:2r00100000, reg6:0, reg7:255)}.play</p>
<p class="p4"><br></p>
<p class="p4"><br></p>
<p class="p5">{<span class="s3">Pan2</span>.ar(<span class="s3">Astrocade</span>.ar(<span class="s3">LFSaw</span>.kr(1, 0, 10, 10), 25, reg4:<span class="s3">MouseX</span>.kr(0, 255), reg5:<span class="s3">MouseY</span>.kr(0, 15)))}.play</p>
<p class="p4"><br></p>
<p class="p5">{<span class="s3">Pan2</span>.ar(<span class="s3">Astrocade</span>.ar(<span class="s3">SinOsc</span>.kr(4, 0, 10, 10), <span class="s3">SinOsc</span>.kr(0.1, 0, 5, 20), reg4:<span class="s3">MouseX</span>.kr(0, 255), reg5:2r00010000, reg6:2r00001111, reg7:<span class="s3">MouseY</span>.kr(0, 15)))}.play</p>
<p class="p4"><br></p>
<p class="p5">{<span class="s3">Pan2</span>.ar(<span class="s3">Astrocade</span>.ar(100, 255, reg4:2r00000111, reg5:<span class="s3">MouseX</span>.kr(0, 255), reg6:2r00001111, reg7:<span class="s3">MouseY</span>.kr(0, 255)))}.play</p>
<p class="p4"><br></p>
<p class="p5">{<span class="s3">Mix</span>(<span class="s3">Astrocade</span>.ar(<span class="s3">MouseX</span>.kr(0, 255), <span class="s3">LFPulse</span>.kr((0.1..5)*30), <span class="s3">LFPulse</span>.kr((0.1..5)*40), <span class="s3">LFPulse</span>.kr((0.1..5)*50), reg5: 2r00000111, reg6:2r01110111).dup)}.play</p>
</body>
</html>
